<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="styles/css/global.css">	
<SCRIPT type="text/javascript" src="commons/dojo.js"></SCRIPT>
<script type="text/javascript">
	dojo.require("dojo.widget.validate");
	 function submitCheck(){
        if (schoolForm.all("school.name").value.length<1){
			      alert('“学校名称”不能为空！');
			      return false;
		}
		if (schoolForm.all("lessonTypeStr").length<1){
			      alert('“课程分类”不能为空！');
			      return false;
		}
	 	schoolForm.submit();
	 	
	 }
</script>
</head>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td class="localTdBg">
					当前位置：	
					
						学校管理 -- 创建新学校
					
				</td>
			</tr>
			
		</table>
<body>
<html:form method="post"  action="school.do?method=doCreateSchool">
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" id="addFormTable">
	<tr>
		<td width="25%" id="addFormTableL">学校名称</td>
		<td width="75%" id="addFormTableR"><input name="school.name" type="text" value="${school.name }"></td>
	</tr>
	<tr>
		<td width="25%">课程分类</td>	
		<td width="75%">
						&nbsp;
		</td>
	</tr>
	<tr>
		<td width="25%">
						&nbsp;
		</td>
		<td width="75%">
			<table>
				<c:forEach var="lessonType" items="${lessonTypeList}">
				<tr>
					<td><input id="lessonTypeStr" name="lessonTypeStr" type="checkbox" value="${lessonType.ltid }">${lessonType.name }</td>
				</tr>
				</c:forEach>
			</table>
		</td>	
	</tr>

 	<tr>
 		<td width="25%">
						&nbsp;
		</td>
 		<td width="75%">
		<input name="Submit" type="button" class="formSubmit" value="提交" onclick="javascript:submitCheck()">
         <input onclick="schoolForm.reset();" type="reset" class="formSubmit" value="重置">
		</td>
	</tr>
</table>
</html:form>
</body>
</html>